<?php

error_reporting(0);

if ( isset( $_POST['submit'] ) ) {


//
//  START WRITE FUNCTION
//  START WRITE FUNCTION 
//

        $file = $_POST['fileCreate'];
	$file_special = htmlspecialchars( $file, ENT_QUOTES );

	$fp = fopen( $file, "w" );
	if ( fwrite( $fp, $file ) ) {
		print "Made file successfully!<br /><br />";
	} else {
		print "Failed to write the files!<br /><br />";
        }
        fclose( $fp );

//
//  END WRITE FUNCTION
//  END WRITE FUNCTION 
//

 }

print "<form action=\"create_file.php\" method=\"post\">File to create: <input type=\"text\" name=\"fileCreate\" /><br /><br /><input type=\"submit\" name=\"submit\" value=\"Create File\"></form>";

?>